function weights = performSupervisedLearn(weights, lambda, gamma, eta, ...
                        maxMoves, avgErrorCount, nonZeroOnly)

if nonZeroOnly == 1
    load games-nonzeromove;
else
    load games-all;
end
                    
                    
[weights, error, xAxis] = supervisedLearn(weights, tables, pieces, ...
               actions, lambda, gamma, eta, maxMoves, avgErrorCount);


figure, plot(xAxis, error);

save weights weights;
